package com.xhwl.logistics.logistics.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 物流车预约请求对象
 */
@Data
public class VisitorRecordRequestParam implements Serializable {

    private Integer id;

    @NotNull(message = "司机姓名不能为空")
    @ApiModelProperty(value = "司机姓名")
    private String driverName;

    @ApiModelProperty(value = "发起人姓名")
    private String promoter;

    @Pattern(regexp = "0|1|2|3",message = "证件类型不能为空，必须为0-3的数据类型")
    @ApiModelProperty(value = "证件类型（0、身份证  1、驾驶证  2、军官证  3、护照）")
    private Integer cardType;

    @NotBlank(message = "证件号码不能为空")
    @ApiModelProperty(value = "证件号码")
    private String idCard;


    @NotBlank(message = "访客电话不能为空")
    @ApiModelProperty(value = "访客电话")
    private String telephone;

    @ApiModelProperty(value = "运送物品照片url")
    private List<String> materialPicUrl;

    @ApiModelProperty(value = "运送物品说明")
    private String materialDescription;

    @ApiModelProperty(value = "人脸照片地址")
    private List<String> faceUrl;

    @ApiModelProperty(value = "车牌号码,由省（粤）+牌照号码=粤A1304")
    private String plateNo;


    @NotNull(message = "有效时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "有效时间开始时间")
    private Date availableStartDate;


    @NotNull(message = "有效时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "有效时间结束时间")
    private Date availableEndDate;

    @ApiModelProperty(value = "访客状态（0、待审批   1、已到访  2、通过  3、未通过 4、已过期  5、取消 ）")
    private Integer status;

    @ApiModelProperty(value = "操作人员账号")
    private String operateUserLoginName;

    @ApiModelProperty(value = "操作人员姓名")
    private String operateUserName;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "操作时间")
    private Date operateDate;

    @ApiModelProperty(value = "关联流程id")
    private Integer flowId;

    @ApiModelProperty(value = "流程名称")
    private String flowName;

    @ApiModelProperty(value = "审批意见")
    private String approvalDescription;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "审批时间")
    private Date approvalDate;

}
